import request from '@/request';

/*
* 密码/验证码登录
*/
export const loginByPwdOrCode = (params) => {
	return request.request('/auth/oauth/token', params, {
		method: 'post',
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		}
	})
}

/*
* 获取验证码
*/
export const getCode = (account) => {
	return request.get('/auth/code/getValidateCode', {account})
}

/*
* 获取用户基本信息
*/
export const getUser = () => {
	return request.get('/rm/userExtension/findResumeByUserId')
}
/*
* 调用wx.login方法，获取code，提交给后端获取openid
*/ 
export const bindAccountBy_wxCode = (code) => {
	return request.post('/wx/miniAppUser/bindAccount?code=' + code)
}
